import {TabPage, HeaderBar, Icon, Table, App, ReactDom, Lang} from 'admin';

import Supply from '../app/admin/page/supply';
import Car from '../app/admin/page/car';
import Client from '../app/admin/page/client';
import Count from '../app/admin/page/count';
import Fitting from '../app/admin/page/fitting';
import FittingNumber from '../app/admin/page/fitting_number';
import In from '../app/admin/page/in';
import Maintain from '../app/admin/page/maintain';
import Warehouse from '../app/admin/page/warehouse';
import Work from '../app/admin/page/work';
import Out from '../app/admin/page/out';
import Proxy from '../app/admin/page/proxy';
import '../app/admin/css/admin.css'
import debug from 'debug';
import Fittingtype from '../app/admin/page/fittingtype';
import Carscategory from '../app/admin/page/carscategory';
import Brand from '../app/admin/page/brand';
import Carmodels from '../app/admin/page/carmodels';
import Type from '../app/admin/page/type';
import InvoiceType from '../app/admin/page/invoice_type';
import ServiceType from '../app/admin/page/service_type';
import Project from '../app/admin/page/project';
import ProFitting from '../app/admin/page/pro_fitting';
const log = debug('main');


if (window.bootstarp === 'ysw.admin') {


    Icon.type = "admin";

    TabPage.register('ysw.supply', Supply);
	TabPage.register('ysw.car', Car);
	TabPage.register('ysw.client', Client);
	TabPage.register('ysw.count', Count);
	TabPage.register('ysw.fitting', Fitting);
	TabPage.register('ysw.fitting_number', FittingNumber);
	TabPage.register('ysw.in', In);
	TabPage.register('ysw.maintain', Maintain);
	TabPage.register('ysw.warehouse', Warehouse);
	TabPage.register('ysw.work', Work);
	TabPage.register('ysw.out', Out);
    TabPage.register('ysw.proxy', Proxy);
    TabPage.register('ysw.fittingtype', Fittingtype);
    TabPage.register('ysw.carscategory', Carscategory);
    TabPage.register('ysw.brand', Brand);
    TabPage.register('ysw.carmodels', Carmodels);
    TabPage.register('ysw.type', Type);
	TabPage.register('ysw.invoice_type', InvoiceType);
	TabPage.register('ysw.service_type', ServiceType);
	TabPage.register('ysw.project', Project);
	TabPage.register('ysw.pro_fitting', ProFitting);
    


    App.register('toast', function (msg) {
        window.toast(<Lang lang={msg}/>)
    });

    App.register('msg', function (msg) {
        window.toast(<Lang lang={msg}/>);
    });

    $(function () {
        ReactDom.render((<App></App>), document.getElementById('react'));
    })
}
module.exports = {};
